
const state = {
  // 设置属性
  // queryData:localStorage.queryData?JSON.parse(localStorage.queryData):[],//首页内容展示静态
userName:localStorage.userName||''
}

const getters = {
  // 获取属性的状态
   getUserName: function (state) {
     // alert( state.userName)
    return state.userName

   }


}

const mutations = {
  // 改变属性的状态
setUserName(state,data){
  state.userName = data
}


}

const actions = {
  setUserName({commit},data){
    commit("setUserName",data)
  }
}

export default{
  state,
  getters,
  mutations,
  actions
}
